import React, { createElement } from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './App';
import './index.css';
// Global error handler to prevent uncaught API errors
window.addEventListener('error', event => {
  // Check if this is an API error (axios or fetch)
  if (event.message.includes('AxiosError') || event.message.includes('fetch') || event.message.includes('status code 403')) {
    console.warn('API error caught:', event.message);
    event.preventDefault(); // Prevent the error from bubbling up
  }
});
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(<React.StrictMode>
    <App />
  </React.StrictMode>);